From: Florian Müllner Date: Tue, 5 Feb 2019 00:11:43 +0000 (+0100) Subject: panel: Restrict app menu width X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~897^2^2~4 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=a87ab6d0fc6cfa4e216e31488fb07925f7234cdc;p=gnome-shell.git panel: Restrict app menu width Window titles aren't restricted in length, so the menu may end up unwieldily width. Commit 0bec76b6ee therefore limited the app context menus, but that got accidentally dropped in commit 0ded0dbfd5. Add back the limitation and extend it to the new app menu as well. https://gitlab.gnome.org/GNOME/gnome-shell/issues/624 --- diff --git a/data/theme/gnome-shell-sass/_common.scss b/data/theme/gnome-shell-sass/_common.scss index cba7914c8..3eb95331d 100644 --- a/data/theme/gnome-shell-sass/_common.scss +++ b/data/theme/gnome-shell-sass/_common.scss @@ -1096,6 +1096,11 @@ StScrollBar { .label-shadow { color: transparent; } } + .app-menu, + .app-well-menu { + max-width: 27.25em; + } + .aggregate-menu { min-width: 21em; .popup-menu-icon { padding: 0 4px; } diff --git a/js/ui/panel.js b/js/ui/panel.js index fb846fc62..1a8d88131 100644 --- a/js/ui/panel.js +++ b/js/ui/panel.js @@ -78,6 +78,8 @@ class AppMenu extends PopupMenu.PopupMenu { constructor(sourceActor) { super(sourceActor, 0.0, St.Side.TOP); + this.actor.add_style_class_name('app-menu'); + this._app = null; this._appSystem = Shell.AppSystem.get_default();